<template>
    <div>
        <paginated-virtual-tree ref="tree" class="margin-top--small" empty-text="无可用的数据表" node-key="id"
            v-loading="isLoading" element-loading-text="数据加载中" :option="defaultTreeProps" :page-size="100"
            :total-count="totalCount" :current-node-key="usedQuery" :filter-node-method="searchDatasource"
            :render-content="renderContent" :load="getFolderTree" :get-root-tree="getRootTree" />
    </div>
</template>

<script>
import PaginatedVirtualTree from '@/components/virtualTree/paginated-tree.vue';
export default {
    components: {
        PaginatedVirtualTree,
    },
    data() {
        return {
            isLoading: false,
            defaultTreeProps: {
                key: 'id',
                label: 'name',
                disabled: data => {
                    return !data.enable && data.type !== 'folder' && !data.isLoadMore;
                },
            },
            totalCount: 100,
            usedQuery: '',
        }
    },
    methods: {
        searchDatasource() {

        },
        renderContent() {

        },
        getFolderTree() {

        },
        getRootTree() {

        }
    }
}
</script>
